package vn.edu.saigontech.ncms.service.impl;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import vn.edu.saigontech.ncms.model.info.StudentType;
import vn.edu.saigontech.ncms.service.StudentTypeService;

public class StudentTypeServiceImpl extends HibernateGenericService<StudentType, Long> implements StudentTypeService {

	@Override
	public StudentType findByName(String name) {
		Criteria criteria = this.createCriteria();
		criteria.add(Restrictions.eq("name", name));
		return (StudentType) criteria.uniqueResult();
	}
}